#ifndef __AD_XPT2046_UTILS_H__
#define __AD_XPT2046_UTILS_H__

/**
 * 测量的引脚地址A2, A1, A0, 见("17.17.XPT2046单端模式输入配置.png")
 * XP   : 测X+, XP(positive),  A2A1A0 = 001 或 011, 再算上最高位S=1 => A2A1A0=0x90/0xB0
 * YP   : 测Y+,  A2A1A0 = 101
 * VBAT : 测VBAT(电池电压),  A2A1A0 = 010
 * AUX  : 测AUX,  A2A1A0 = 110
 */
#define AD_XPT2046_XP   0x90
#define AD_XPT2046_YP   0xD0
#define AD_XPT2046_VBAT 0xA0
#define AD_XPT2046_AUX  0xE0


unsigned int XPT2046_ReadAD(unsigned char A2A1A0_Command, bit is_8bit_MODE, bit isSER, bit is_Open_Inner_Vref, bit PD0);

#endif // !__AD_XPT2046_UTILS_H__